package com.geekjob1120.geekjob1120pay.controller;

import com.geekjob1120.geekjob1120pay.modle.Pay;
import com.geekjob1120.geekjob1120pay.service.PayOrderSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("payOrder")
public class PayOrderController {
    @Autowired
    PayOrderSevice payOrderSevice;

    @GetMapping("/{orderId}")
    @ResponseBody
    public Pay getPayByOrderID(@PathVariable("orderId") String orderId){
        return payOrderSevice.findPayByOrdId(orderId);
    }
}
